﻿namespace StaticConstructor
{
    class Program
    {
        static void Main(string[] args)
        {
            Bus bus;
            bus = new Bus();
            bus.Drive();
            //Bus.Drive();
        }

        public class Bus
        {
            // Static constructor:
            static Bus()
            {
                System.Console.WriteLine("The static constructor invoked.");
            }
            public Bus()
            {
                System.Console.WriteLine("The constructor invoked.");
            }

            public void Drive()
            {
                System.Console.WriteLine("The Drive method invoked.");
            }
        }
    }
}
